package wcpackage.webapplication.view.welcomepage;

import org.apache.wicket.markup.html.basic.Label;
import org.apache.wicket.markup.html.link.BookmarkablePageLink;
import org.apache.wicket.markup.html.link.Link;
import org.apache.wicket.spring.injection.annot.SpringBean;
import wcpackage.service.UserService;
import wcpackage.webapplication.view.BasePage;
import wcpackage.webapplication.view.admin.AdminPage;
import wcpackage.webapplication.view.users.UsersPage;
import wcpackage.webapplication.view.visural.EditorPage;

/**
 * User: rabbit
 * Date: Jun 3, 2009
 * Time: 10:51:34 PM
 */
public class WelcomePage extends BasePage {

    @SpringBean
    private UserService userService;

    public WelcomePage() {
        add(new Label("helloWorld", "Hello World!"));
        add(new Link("adminLink") {

            public void onClick() {
                setResponsePage(AdminPage.class);
            }
        });
        add(new BookmarkablePageLink("editorLink", EditorPage.class));
        add(new BookmarkablePageLink("usersLink", UsersPage.class));
    }
}
